<div ng-controller="ItemCtrl" ng-init="virtualAction()" class="sui-form form-horizontal">
    <ul class="sui-breadcrumb">
        <li><a href="#/item/list">{{'Item'| translate}}</a></li>
        <li class="active">{{'组合商品' | translate}}</li>
        <span class="sui-form sui-form pull-right">
            <a href="#/item/sku2skus" id="addNew" class="sui-btn btn-primary" ng-show="is_main == 1">+{{ "add_new" | translate }}</a>
        </span>
    </ul>

    <table class="sui-table table-bordered">
        <thead>
            <tr>
                <th>外部编码</th>
                <th>SKU编号</th>
                <th nowrap>{{ "sku图片" | translate }}</th>
                <th nowrap>{{ "名称" | translate }}</th>
                <th nowrap>{{ "price" | translate }}</th>
                <th nowrap>{{ "组合内sku" | translate }}</th>
                <th nowrap>{{ "operation" | translate }}</th>
            </tr>
        </thead>
        <tbody>
            <tr ng-repeat="list in virtual_list">
                <td>
                    {{ list.sku_data.sku_outer_id }}
                </td>
                <td>
                    {{list.sku_data.sku_id}}
                </td>
                <td style="width:120px;">
                    <img ng-src="{{ list.sku_data.imgurl }}" width="100" /> {{list.title}}
                </td>
                <td>
                    {{ list.sku_data.sku_properties | skuname }}
                </td>
                <td>{{ list.sku_data.sku_price }}</td>
                <td rowspan="list.s_sku.length">
                    <table class="sui-table table-bordered">
                        <tr>
                            <td>{{ "item_image" | translate }}</td>
                            <td>{{ "外部编码" | translate }}</td>
                            <td>{{ "属性" | translate }}</td>
                            <td>{{ "数量" | translate }}</td>
                        </tr>
                        <tr ng-repeat="s_sku in list.s_sku">
                            <td>
                                <img ng-src="{{ s_sku.imgurl }}" width="100" />
                            </td>
                            <td>
                                {{s_sku.sku_outer_id}}
                            </td>
                            <td>
                                {{s_sku.sku_properties | skuname}}
                            </td>
                            <td>
                                {{s_sku.num}}
                            </td>
                        </tr>
                    </table>
                </td>
                <td style="width:80px;">
                    <a ng-show="is_main == 1" href="#/item/sku2skus?sku_id={{ list.sku_id }}" class="sui-btn btn-info" style="margin-bottom:10px">{{ "edit" | translate }}</a>
                    <button ng-show="is_main == 1" class="sui-btn btn-danger" ng-click="delVirtual(list.sku_id);">
                        删除
                    </button>
                </td>
            </tr>
        </tbody>
    </table>
    <!-- 分页start -->
    <pager page-no="{{ pageNo }}" page-size="pageSize" total="total_count" get-data="getVirtualist(pageNo)"></pager>
    <!-- 分页end -->
</div>